.class public Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;
.super Lcom/estrongs/android/ui/base/HomeAsBackActivity;
.source "ApkShareActivity.java"

# interfaces
.implements Les/x00$b;


# instance fields
.field public j:Landroid/widget/EditText;

.field public k:Lcom/estrongs/android/pop/app/filetransfer/server/a;

.field private l:Ljava/lang/String;

.field public m:Les/x00;

.field public n:Landroid/net/wifi/WifiConfiguration;

.field private o:Landroidx/appcompat/widget/Toolbar;

.field private p:Landroidx/appcompat/app/ActionBar;

.field private q:Z

.field private r:Landroid/net/wifi/WifiConfiguration;

.field private s:Landroid/net/wifi/WifiManager;

.field private t:Landroid/net/wifi/WifiInfo;

.field private u:Z


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;-><init>()V

    return-void
.end method

.method private F()V
    .locals 3

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->m:Les/x00;

    invoke-virtual {v0}, Les/x00;->c()V

    .line 2
    invoke-static {}, Lcom/estrongs/android/util/q;->a()V

    .line 3
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->u:Z

    if-eqz v0, :cond_0

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->s:Landroid/net/wifi/WifiManager;

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/net/wifi/WifiManager;->setWifiEnabled(Z)Z

    .line 5
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->t:Landroid/net/wifi/WifiInfo;

    if-eqz v0, :cond_0

    .line 6
    iget-object v2, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->s:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0}, Landroid/net/wifi/WifiInfo;->getNetworkId()I

    move-result v0

    invoke-virtual {v2, v0, v1}, Landroid/net/wifi/WifiManager;->enableNetwork(IZ)Z

    .line 7
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->r:Landroid/net/wifi/WifiConfiguration;

    if-eqz v0, :cond_2

    .line 8
    iget-boolean v1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->q:Z

    if-eqz v1, :cond_1

    .line 9
    iget-object v1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->m:Les/x00;

    invoke-virtual {v1, v0}, Les/x00;->a(Landroid/net/wifi/WifiConfiguration;)Z

    goto :goto_0

    .line 10
    :cond_1
    invoke-static {v0}, Lcom/estrongs/android/util/q;->a(Landroid/net/wifi/WifiConfiguration;)V

    :cond_2
    :goto_0
    return-void
.end method

.method private G()V
    .locals 2

    .line 1
    invoke-static {}, Lcom/estrongs/android/util/q;->f()Z

    move-result v0

    iput-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->q:Z

    .line 2
    invoke-static {}, Lcom/estrongs/android/util/q;->d()Landroid/net/wifi/WifiConfiguration;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->r:Landroid/net/wifi/WifiConfiguration;

    .line 3
    iget-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->q:Z

    if-eqz v0, :cond_0

    .line 4
    invoke-static {}, Lcom/estrongs/android/util/q;->a()V

    goto :goto_0

    .line 5
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->s:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->isWifiEnabled()Z

    move-result v0

    iput-boolean v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->u:Z

    if-eqz v0, :cond_1

    .line 6
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->s:Landroid/net/wifi/WifiManager;

    invoke-virtual {v0}, Landroid/net/wifi/WifiManager;->getConnectionInfo()Landroid/net/wifi/WifiInfo;

    move-result-object v0

    iput-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->t:Landroid/net/wifi/WifiInfo;

    .line 7
    :cond_1
    :goto_0
    new-instance v0, Les/x00;

    invoke-direct {v0, p0, p0}, Les/x00;-><init>(Landroid/content/Context;Les/x00$b;)V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->m:Les/x00;

    .line 8
    invoke-virtual {v0}, Les/x00;->d()V

    .line 9
    new-instance v0, Landroid/net/wifi/WifiConfiguration;

    invoke-direct {v0}, Landroid/net/wifi/WifiConfiguration;-><init>()V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->n:Landroid/net/wifi/WifiConfiguration;

    const v1, 0x7f1109f5

    .line 10
    invoke-virtual {p0, v1}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Landroid/net/wifi/WifiConfiguration;->SSID:Ljava/lang/String;

    .line 11
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->n:Landroid/net/wifi/WifiConfiguration;

    iget-object v0, v0, Landroid/net/wifi/WifiConfiguration;->allowedKeyManagement:Ljava/util/BitSet;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Ljava/util/BitSet;->set(I)V

    .line 12
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->m:Les/x00;

    iget-object v1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->n:Landroid/net/wifi/WifiConfiguration;

    invoke-virtual {v0, v1}, Les/x00;->a(Landroid/net/wifi/WifiConfiguration;)Z

    return-void
.end method


# virtual methods
.method public e(I)V
    .locals 0

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onCreate(Landroid/os/Bundle;)V

    const p1, 0x7f0c0027

    .line 2
    invoke-virtual {p0, p1}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->setContentView(I)V

    const p1, 0x7f1109f9

    .line 3
    invoke-virtual {p0, p1}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {p0, p1}, Landroid/app/Activity;->setTitle(Ljava/lang/CharSequence;)V

    const p1, 0x7f090bdd

    .line 4
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroidx/appcompat/widget/Toolbar;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->o:Landroidx/appcompat/widget/Toolbar;

    .line 5
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESActivity;->setSupportActionBar(Landroidx/appcompat/widget/Toolbar;)V

    .line 6
    invoke-virtual {p0}, Landroidx/appcompat/app/AppCompatActivity;->getSupportActionBar()Landroidx/appcompat/app/ActionBar;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->p:Landroidx/appcompat/app/ActionBar;

    const-string p1, "wifi"

    .line 7
    invoke-virtual {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESActivity;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Landroid/net/wifi/WifiManager;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->s:Landroid/net/wifi/WifiManager;

    const p1, 0x7f09011f

    .line 8
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/EditText;

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->j:Landroid/widget/EditText;

    .line 9
    invoke-virtual {p0}, Landroid/app/Activity;->getApplicationContext()Landroid/content/Context;

    move-result-object p1

    invoke-virtual {p1}, Landroid/content/Context;->getPackageResourcePath()Ljava/lang/String;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->l:Ljava/lang/String;

    .line 10
    new-instance v0, Lcom/estrongs/android/pop/app/filetransfer/server/a;

    const/16 v1, 0x1f90

    invoke-direct {v0, p1, v1}, Lcom/estrongs/android/pop/app/filetransfer/server/a;-><init>(Ljava/lang/String;I)V

    iput-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->k:Lcom/estrongs/android/pop/app/filetransfer/server/a;

    .line 11
    iget-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->l:Ljava/lang/String;

    const-string v0, "TAG"

    invoke-static {v0, p1}, Lcom/estrongs/android/util/n;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 12
    :try_start_0
    iget-object p1, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->k:Lcom/estrongs/android/pop/app/filetransfer/server/a;

    invoke-virtual {p1}, Lcom/estrongs/android/pop/app/filetransfer/server/NanoHTTPD;->b()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_0

    :catch_0
    move-exception p1

    .line 13
    invoke-virtual {p1}, Ljava/io/IOException;->printStackTrace()V

    .line 14
    :goto_0
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->G()V

    return-void
.end method

.method protected onDestroy()V
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->k:Lcom/estrongs/android/pop/app/filetransfer/server/a;

    invoke-virtual {v0}, Lcom/estrongs/android/pop/app/filetransfer/server/NanoHTTPD;->c()V

    .line 2
    invoke-super {p0}, Lcom/estrongs/android/pop/esclasses/ESActivity;->onDestroy()V

    .line 3
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->F()V

    return-void
.end method

.method protected onStart()V
    .locals 4

    .line 1
    invoke-super {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->onStart()V

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/pop/app/filetransfer/ApkShareActivity;->p:Landroidx/appcompat/app/ActionBar;

    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v1

    invoke-virtual {p0}, Lcom/estrongs/android/ui/base/HomeAsBackActivity;->B()I

    move-result v2

    const v3, 0x7f060320

    invoke-virtual {v1, v2, v3}, Lcom/estrongs/android/ui/theme/b;->b(II)Landroid/graphics/drawable/Drawable;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroidx/appcompat/app/ActionBar;->setHomeAsUpIndicator(Landroid/graphics/drawable/Drawable;)V

    return-void
.end method
